/*
 Navicat Premium Dump SQL

 Source Server         : 唯恩
 Source Server Type    : MySQL
 Source Server Version : 80024 (8.0.24)
 Source Host           : 192.168.10.203:3306
 Source Schema         : firelink_data_access

 Target Server Type    : MySQL
 Target Server Version : 80024 (8.0.24)
 File Encoding         : 65001

 Date: 17/02/2025 17:47:43
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for alarm_all_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `alarm_all_devicedatachanged`;
CREATE TABLE `alarm_all_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` mediumtext COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  `type` varchar(36) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='所有的报警数据-概述';

-- ----------------------------
-- Records of alarm_all_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for alarm_in_normalrecord
-- ----------------------------
DROP TABLE IF EXISTS `alarm_in_normalrecord`;
CREATE TABLE `alarm_in_normalrecord` (
  `number` varchar(30) DEFAULT NULL COMMENT '设备号',
  `time` varchar(30) DEFAULT NULL COMMENT '上次记录时间',
  `type` varchar(30) DEFAULT NULL COMMENT '记录类型code或中文'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='报警的平时数据时间记录';

-- ----------------------------
-- Records of alarm_in_normalrecord
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for alarmrecord
-- ----------------------------
DROP TABLE IF EXISTS `alarmrecord`;
CREATE TABLE `alarmrecord` (
  `number` varchar(100) DEFAULT NULL COMMENT '设备号',
  `time` varchar(30) DEFAULT NULL COMMENT '上次报警时间',
  `type` varchar(30) DEFAULT NULL COMMENT '报警类型code或中文',
  `version` int DEFAULT '1' COMMENT '乐观锁版本'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='报警时间记录';

-- ----------------------------
-- Records of alarmrecord
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auto_network_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `auto_network_alarm_devicedatachanged`;
CREATE TABLE `auto_network_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  `type` varchar(255) DEFAULT NULL COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='自动联网-报警数据-概述';

-- ----------------------------
-- Records of auto_network_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auto_network_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `auto_network_normal_devicedatachanged`;
CREATE TABLE `auto_network_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='自动联网-平时数据-概述';

-- ----------------------------
-- Records of auto_network_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for business_checkaddr_type
-- ----------------------------
DROP TABLE IF EXISTS `business_checkaddr_type`;
CREATE TABLE `business_checkaddr_type` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `pid` varchar(36) DEFAULT NULL COMMENT '父级id',
  `level` int DEFAULT NULL COMMENT '等级',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='巡查点类型';

-- ----------------------------
-- Records of business_checkaddr_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for business_type
-- ----------------------------
DROP TABLE IF EXISTS `business_type`;
CREATE TABLE `business_type` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `pid` varchar(36) DEFAULT NULL COMMENT '父级id',
  `level` int DEFAULT NULL COMMENT '等级',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='单位类别';

-- ----------------------------
-- Records of business_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for camera_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `camera_alarm_devicedatachanged`;
CREATE TABLE `camera_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `path` varchar(500) DEFAULT NULL,
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='可视化-报警数据-概述';

-- ----------------------------
-- Records of camera_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for coap_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `coap_devicedatachanged`;
CREATE TABLE `coap_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-其他数据-概述';

-- ----------------------------
-- Records of coap_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for company
-- ----------------------------
DROP TABLE IF EXISTS `company`;
CREATE TABLE `company` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='公司';

-- ----------------------------
-- Records of company
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for device
-- ----------------------------
DROP TABLE IF EXISTS `device`;
CREATE TABLE `device` (
  `id` varchar(36) NOT NULL COMMENT '设备id',
  `imei` varchar(50) DEFAULT NULL COMMENT 'imei号',
  `company_id` varchar(36) DEFAULT NULL COMMENT '公司id',
  `number` varchar(50) DEFAULT NULL COMMENT '设备号',
  `device_classify` varchar(36) DEFAULT NULL COMMENT '设备分类:1 电气火灾 2 消防用水 3 烟感 4 可燃气体 5 火灾自动联网 6 消防可视化',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='设备表';

-- ----------------------------
-- Records of device
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dict
-- ----------------------------
DROP TABLE IF EXISTS `dict`;
CREATE TABLE `dict` (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键id',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
  `groupname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '组名',
  `sortid` int DEFAULT NULL COMMENT '排序字段',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='字典表';

-- ----------------------------
-- Records of dict
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dict_child
-- ----------------------------
DROP TABLE IF EXISTS `dict_child`;
CREATE TABLE `dict_child` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `pid` varchar(36) DEFAULT NULL COMMENT '父级id',
  `pidname` varchar(50) DEFAULT NULL COMMENT '父级名称',
  `groupname` varchar(50) DEFAULT NULL COMMENT 'dict表中的组名',
  `sortid` int DEFAULT NULL COMMENT '排序字段',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='字典表字表';

-- ----------------------------
-- Records of dict_child
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dict_copy
-- ----------------------------
DROP TABLE IF EXISTS `dict_copy`;
CREATE TABLE `dict_copy` (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键id',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
  `groupname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '组名',
  `sortid` int DEFAULT NULL COMMENT '排序字段',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='字典表';

-- ----------------------------
-- Records of dict_copy
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_alarm_devicedatachanged`;
CREATE TABLE `electricfire_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-报警信息';

-- ----------------------------
-- Records of electricfire_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_all_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_all_devicedatachanged`;
CREATE TABLE `electricfire_all_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-所有数据';

-- ----------------------------
-- Records of electricfire_all_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_normal_devicedatachanged`;
CREATE TABLE `electricfire_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-平时数据-概述';

-- ----------------------------
-- Records of electricfire_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_other_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_other_devicedatachanged`;
CREATE TABLE `electricfire_other_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-其他数据-概述';

-- ----------------------------
-- Records of electricfire_other_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_othernormal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_othernormal_devicedatachanged`;
CREATE TABLE `electricfire_othernormal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-其他平时数据-概述';

-- ----------------------------
-- Records of electricfire_othernormal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_type
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_type`;
CREATE TABLE `electricfire_type` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `mark` varchar(50) DEFAULT NULL COMMENT '标识',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `unit` varchar(10) DEFAULT NULL COMMENT '单位',
  `company_id` varchar(36) DEFAULT NULL COMMENT '公司id',
  `isuse` tinyint(1) DEFAULT NULL COMMENT '是否使用：1 使用 0 不使用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气符号类型';

-- ----------------------------
-- Records of electricfire_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for electricfire_type_copy
-- ----------------------------
DROP TABLE IF EXISTS `electricfire_type_copy`;
CREATE TABLE `electricfire_type_copy` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `mark` varchar(50) DEFAULT NULL COMMENT '标识',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `unit` varchar(10) DEFAULT NULL COMMENT '单位',
  `company_id` varchar(36) DEFAULT NULL COMMENT '公司id',
  `isuse` tinyint(1) DEFAULT NULL COMMENT '是否使用：1 使用 0 不使用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气符号类型';

-- ----------------------------
-- Records of electricfire_type_copy
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fireextinguisher_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `fireextinguisher_alarm_devicedatachanged`;
CREATE TABLE `fireextinguisher_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='灭火器-报警数据-概述';

-- ----------------------------
-- Records of fireextinguisher_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fireextinguisher_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `fireextinguisher_normal_devicedatachanged`;
CREATE TABLE `fireextinguisher_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='灭火器-平时数据-概述';

-- ----------------------------
-- Records of fireextinguisher_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for firewater_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `firewater_alarm_devicedatachanged`;
CREATE TABLE `firewater_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='水-报警数据-概述';

-- ----------------------------
-- Records of firewater_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for firewater_all_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `firewater_all_devicedatachanged`;
CREATE TABLE `firewater_all_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  `type` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='水-所有数据-概述';

-- ----------------------------
-- Records of firewater_all_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for firewater_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `firewater_normal_devicedatachanged`;
CREATE TABLE `firewater_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='水-平时数据-概述';

-- ----------------------------
-- Records of firewater_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for firewater_type
-- ----------------------------
DROP TABLE IF EXISTS `firewater_type`;
CREATE TABLE `firewater_type` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `mark` varchar(50) DEFAULT NULL COMMENT '标识',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `unit` varchar(10) DEFAULT NULL COMMENT '单位',
  `company_id` varchar(36) DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气符号类型';

-- ----------------------------
-- Records of firewater_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for firewaters_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `firewaters_alarm_devicedatachanged`;
CREATE TABLE `firewaters_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='水-报警数据数据-概述';

-- ----------------------------
-- Records of firewaters_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for firewaters_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `firewaters_normal_devicedatachanged`;
CREATE TABLE `firewaters_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='水-平时数据-概述';

-- ----------------------------
-- Records of firewaters_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for gas_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `gas_alarm_devicedatachanged`;
CREATE TABLE `gas_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  `type` varchar(255) DEFAULT NULL COMMENT '数据类型（CO）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-报警信息';

-- ----------------------------
-- Records of gas_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for gas_alarm_http_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `gas_alarm_http_devicedatachanged`;
CREATE TABLE `gas_alarm_http_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='电气火灾-报警信息';

-- ----------------------------
-- Records of gas_alarm_http_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hik_event
-- ----------------------------
DROP TABLE IF EXISTS `hik_event`;
CREATE TABLE `hik_event` (
  `id` varchar(20) NOT NULL COMMENT '事件ID',
  `content` varchar(255) NOT NULL COMMENT '报警内容',
  `group_name` varchar(20) NOT NULL COMMENT '平台分组名称',
  `alarm_type` varchar(2) DEFAULT NULL COMMENT '安工院报警类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='海康事件表';

-- ----------------------------
-- Records of hik_event
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for led
-- ----------------------------
DROP TABLE IF EXISTS `led`;
CREATE TABLE `led` (
  `id` varchar(36) NOT NULL,
  `json_data` text,
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of led
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for newsmoke_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `newsmoke_alarm_devicedatachanged`;
CREATE TABLE `newsmoke_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='烟感-报警数据-概述';

-- ----------------------------
-- Records of newsmoke_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for normalrecord
-- ----------------------------
DROP TABLE IF EXISTS `normalrecord`;
CREATE TABLE `normalrecord` (
  `number` varchar(30) DEFAULT NULL COMMENT '设备号',
  `time` varchar(30) DEFAULT NULL COMMENT '上次记录时间',
  `type` varchar(30) DEFAULT NULL COMMENT '记录类型code或中文'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='平时数据时间记录';

-- ----------------------------
-- Records of normalrecord
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for panan_smock_number
-- ----------------------------
DROP TABLE IF EXISTS `panan_smock_number`;
CREATE TABLE `panan_smock_number` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `device_number` varchar(200) DEFAULT NULL COMMENT '设备id',
  `iot_number` varchar(200) DEFAULT NULL COMMENT '物联网卡号',
  `ieim_number` varchar(200) DEFAULT NULL COMMENT 'IEIM号',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of panan_smock_number
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for region
-- ----------------------------
DROP TABLE IF EXISTS `region`;
CREATE TABLE `region` (
  `id` varchar(36) NOT NULL COMMENT '行政区划id((需要uuid的形式))',
  `name` varchar(100) DEFAULT NULL COMMENT '行政区划名称',
  `pid` varchar(36) DEFAULT NULL COMMENT '父级行政区划id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='行政区划表';

-- ----------------------------
-- Records of region
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sanjiangyun_alarm_all_device_info
-- ----------------------------
DROP TABLE IF EXISTS `sanjiangyun_alarm_all_device_info`;
CREATE TABLE `sanjiangyun_alarm_all_device_info` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` mediumtext COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  `type` varchar(36) DEFAULT NULL COMMENT '设备类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='三江云_设备原始数据';

-- ----------------------------
-- Records of sanjiangyun_alarm_all_device_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for smoke_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `smoke_alarm_devicedatachanged`;
CREATE TABLE `smoke_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='烟感-报警数据-概述';

-- ----------------------------
-- Records of smoke_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for smoke_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `smoke_normal_devicedatachanged`;
CREATE TABLE `smoke_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='烟感-平时数据-概述';

-- ----------------------------
-- Records of smoke_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for smokeanpaiceshi
-- ----------------------------
DROP TABLE IF EXISTS `smokeanpaiceshi`;
CREATE TABLE `smokeanpaiceshi` (
  `id` varchar(36) NOT NULL,
  `json` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of smokeanpaiceshi
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for test_device
-- ----------------------------
DROP TABLE IF EXISTS `test_device`;
CREATE TABLE `test_device` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` mediumtext COMMENT '原始数据',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='报警数据数据接受测试-勿删';

-- ----------------------------
-- Records of test_device
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for video_alarm_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `video_alarm_devicedatachanged`;
CREATE TABLE `video_alarm_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `path` varchar(500) DEFAULT NULL,
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='可视化-报警数据-概述';

-- ----------------------------
-- Records of video_alarm_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for video_normal_devicedatachanged
-- ----------------------------
DROP TABLE IF EXISTS `video_normal_devicedatachanged`;
CREATE TABLE `video_normal_devicedatachanged` (
  `id` varchar(36) NOT NULL COMMENT '主键id',
  `jsondata` text COMMENT '原始数据',
  `path` varchar(500) DEFAULT NULL COMMENT '路径',
  `date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='可视化-平时数据-概述';

-- ----------------------------
-- Records of video_normal_devicedatachanged
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
